package cn.com.hatech.blog.module.admin.comment.vo;

import cn.com.hatech.blog.module.admin.comment.entity.Comment;
import lombok.Data;

import java.util.List;

/**
 * @projectName: hatech-blog
 * @package: cn.com.hatech.blog.module.admin.vo
 * @className: CommentVO
 * @author: xuruikai
 * @description: 返回页面的评论，包含父子评论内容
 * @date: 2020/1/11 14:27
 * @version: 1.0
 */
@Data
public class CommentVO extends Comment {

    private Integer levels;

    private List<Comment> children;

    public CommentVO(Comment comments) {
        setAuthor(comments.getAuthor());
        setMail(comments.getMail());
        setId(comments.getId());
        setUrl(comments.getUrl());
        setCreateTime(comments.getCreateTime());
        setAgent(comments.getAgent());
        setIp(comments.getIp());
        setContent(comments.getContent());
        setOwnerId(comments.getOwnerId());
    }

}
